package com.lincong.service.combine.impl;

import com.lincong.entity.bo.HeadLine;
import com.lincong.entity.bo.ShopCategory;
import com.lincong.entity.dto.MainPageInfoDTO;
import com.lincong.entity.dto.Result;
import com.lincong.service.combine.HeadLineShopCategoryCombineService;
import com.lincong.service.solo.HeadLineService;
import com.lincong.service.solo.ShopCategoryService;
import org.simpleframework.core.annotation.Service;
import org.simpleframework.inject.annotation.Autowired;

import java.util.List;

/**
 * @author linchong
 * @version 1.0
 * @Date: 2022-05-11 10:36
 * @Description: HeadLineShopCategoryServiceImpl$
 */
@Service
public class HeadLineShopCategoryCombineServiceImpl2 implements HeadLineShopCategoryCombineService {

	@Autowired
	private HeadLineService headLineService;

	@Autowired
	private ShopCategoryService shopCategoryService;
	@Override
	public Result<MainPageInfoDTO> getMainPageInfo() {
		HeadLine headLineCondition = new HeadLine();
		headLineCondition.setEnableStatus(1);
		Result<List<HeadLine>> headLines = headLineService.queryHeadLine(headLineCondition, 1, 4);

		ShopCategory shopCategoryCondition = new ShopCategory();
		Result<List<ShopCategory>> queryShopCategorys = shopCategoryService.queryShopCategory(shopCategoryCondition, 1, 100);

		Result<MainPageInfoDTO> result = mergeMainPageInfoResult(headLines,queryShopCategorys);

		return result;
	}

	private Result<MainPageInfoDTO> mergeMainPageInfoResult(Result<List<HeadLine>> headLines, Result<List<ShopCategory>> queryShopCategorys) {


		return null;
	}
}
